package dormouse.vfs.task;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;

import org.apache.commons.vfs2.FileObject;

/**
 * This class serves as a template for file-related operations.  To use it, extend the class
 * and implement the {@link #call()} method.
 */
public abstract class FileTask implements Callable<Void>{
	
	/** The list of files to operate on. */
	private List<FileObject> fileList = new ArrayList<FileObject>();
	
	/**
	 * Constructor.
	 * @param file the file to operate on
	 */
	public FileTask(FileObject file){
		fileList.add(file);
	}
	
	/**
	 * Constructor.
	 * @param fileList the list of files to operation on.
	 */
	public FileTask(List<FileObject> fileList){
		this.fileList = fileList;
	}

	/**
	 * Override this method to provide the FileTaskManager with useful information 
	 * about the operation.
	 */
	@Override
	public String toString(){
		return "";
	}

}
